home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-03 | 1.9 KB | 59 lines | [TEXT/MPS ] |
- // UniversalStartup.h
- // Copyright © 1995-96 by Apple Computer, Inc. All rights reserved.
-
- #ifndef __UNIVERSALSTARTUP__
- #define __UNIVERSALSTARTUP__
-
- // MacApp
-
- #ifndef __UCOREGLOBALS__
- #include "UCoreGlobals.h"
- #endif
-
-
- //----------------------------------------------------------------------------------------
- // Initialization code that needs to always be compiled for 68000.
- //----------------------------------------------------------------------------------------
-
- //
- // Support for early expansion of the heap requires that we know how
- // much stack space to reserve. The mem!/ppc!/68k! resources will be summed
- // and their results saved for later usage as well.
- //
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
- struct Mem
- {
- long objectHeap, heapIncrement, codeVal, lowSpaceVal, stackVal;
- };
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- typedef Mem *MemPtr, **MemHandle;
-
- extern Size gSizeObjectHeap;
- extern Size gSizeHeapIncrement;
- extern Size gSizeTempReserve;
- extern Size gSizeLowSpaceReserve;
- extern Size gStackTot;
-
- extern Boolean gHasProcessMgr; // saved from InitToolBox for configuration info
- extern Boolean gIsOnlyBackground; // saved from InitToolBox for configuration info
- extern Boolean gIsHighLevelEventAware; // saved from InitToolBox for configuration info
- extern short gProcessor; // saved from ValidateHardware for configuration info
- extern Boolean gHasFPU; // saved from ValidateHardware for configuration info
-
- void UniversalStartup();
- // Call from earliest possible place in your runtime unit. As first static constructor if possible.
- // Initializes toolbox and calls ValidateProcessor to make certain that when this call returns you
- // are at least running on the processor that you were compiled to require.
-
- Boolean ValidateProcessor();
-
- void AlertUnsupportedConfiguration();
- // Call if you determine that the current machine isn't good enough. Puts up alert and quits app.
-
- #endif // __UNIVERSALSTARTUP__
-